<?php
$url = 'http://micronet.com/?t=eee&sss=sss';
print_r(parse_url($url));
echo parse_url($url, PHP_URL_PATH);

$url = 'http://www.micronet.com/?t=eee&sss=sss';
print_r(parse_url($url));
echo parse_url($url, PHP_URL_PATH);

$url = 'http://www.ipoditunesongo.com/LeadForce1/lf1-newsletter/july06/images/articles-title.jpg?=t1132';
print_r(parse_url($url));
echo parse_url($url, PHP_URL_PATH);

$url = 'http://www.sitime.com/mysitime-registration/registers?t=1';
print_r(parse_url($url));
echo parse_url($url, PHP_URL_PATH);

$url = '../res/img/temp/634043/original/cc3d8715eed0c.png)';
print_r(parse_url($url));
echo parse_url($url, PHP_URL_PATH);

$regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>";
	if(preg_match_all("/$regexp/siU", $text, $matches, PREG_SET_ORDER)) {
		print_r($matches); // = array of link addresses
		//print_r($matches[3]); // = array of link text - including HTML code
	}

?>